package headfirst.designpatterns.factory.c_pizzaaf_abstartfactory.z_pizzaaf_run;

import headfirst.designpatterns.factory.c_pizzaaf_abstartfactory.b_pizza.Pizza;
import headfirst.designpatterns.factory.c_pizzaaf_abstartfactory.pizzastore.ChicagoPizzaStore;
import headfirst.designpatterns.factory.c_pizzaaf_abstartfactory.pizzastore.NYPizzaStore;
import headfirst.designpatterns.factory.c_pizzaaf_abstartfactory.pizzastore.PizzaStore;

/**
 * 抽象工厂测试
 *
 */
public class PizzaTestDrive {
 
	public static void main(String[] args) {
		// 纽约店
		PizzaStore nyStore = new NYPizzaStore();
		// 芝加哥店
		PizzaStore chicagoStore = new ChicagoPizzaStore();

		// 芝士披萨
		Pizza pizza = nyStore.orderPizza("cheese");
		System.out.println("Ethan 点了一个 " + pizza + "\n");
		pizza = chicagoStore.orderPizza("cheese");
		System.out.println("Joel 点了一个 " + pizza + "\n");

		// 蛤蜊披萨
		pizza = nyStore.orderPizza("clam");
		System.out.println("Ethan 点了一个 " + pizza + "\n");
		pizza = chicagoStore.orderPizza("clam");
		System.out.println("Joel 点了一个 " + pizza + "\n");

		// 意大利辣香肠
		pizza = nyStore.orderPizza("pepperoni");
		System.out.println("Ethan 点了一个 " + pizza + "\n");
		pizza = chicagoStore.orderPizza("pepperoni");
		System.out.println("Joel 点了一个 " + pizza + "\n");

		// 素食披萨
		pizza = nyStore.orderPizza("veggie");
		System.out.println("Ethan 点了一个 " + pizza + "\n");
		pizza = chicagoStore.orderPizza("veggie");
		System.out.println("Joel 点了一个 " + pizza + "\n");
	}
}
